<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <script src="/static/admin/index/jquery.min.js"></script>
    <script src="/static/admin/index/echarts.min.js"></script>
    <script src="/static/admin/index/vue.min.js"></script>
    <script src="/static/admin/index/MagicCusJSFun.js"></script>
    <script src="/static/admin/index/HttpRequest.js"></script>
    <link rel="stylesheet" href="/static/admin/index/index.css">
    <!-- 引入组件库 -->
    <script src="/static/admin/index/index.js"></script>
    <style>

        #app {
            background-color: #F3F3F3;
            padding: 15px;
        }

        .top {
            display: flex;
            justify-content: space-between;
        }

        .top .top-item {
            width: 45%;
            padding: 30px 2%;
            background-color: #ffffff;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .top .prese {
            font-size: 28px;
        }

        .documenData {
            display: flex;

            margin: 15px auto;
        }

        .documenData .documenDataItem {
            width: 24%;
            margin-right: 1%;
            padding: 15px 0;
            /*display: flex;*/
            /*flex-direction: column;*/
            /*align-items: center;*/
            text-align: left;
            justify-content: left;
            background-color: #FFFFFF;
        }

        .documenData .documenDataItem:last-child {
            margin-right: 0;
        }

        .documenData .documenDataItem .documenDataItemImg {
            display: flex;
            align-items: center;
            margin-left: 30px;
        }

        .documenData .documenDataItem .documenDataItemImg img {
            width: 20px;
            height: 20px;
            margin-right: 8px;
        }

        .documenData .documenDataItem .documenDataItemTxt {
            display: flex;
            align-items: center;
            margin-left: 30px;
            font-size: 28px;
        }

        .doucment_member {
            background-color: #ffffff;
            padding: 15px;
        }

        .doucment_member .tt {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 15px;
        }

        .doucment_member .doucment_member_list {
            display: flex;
            flex-wrap: wrap;
        }

        .doucment_member .doucment_member_list .doucment_member_list_item {
            width: 23%;
            padding: 5px 2%;
            padding-left: 0;
            display: flex;
            position: relative;
            justify-content: space-between;
        }

        .doucment_member .doucment_member_list .doucment_member_list_item::before {
            content: "";
            position: absolute;
            width: 1px;
            background-color: #DDDDDD;
            top: 5%;
            height: 80%;
            right: 2%;

        }

        .doucment_member .doucment_member_list .doucment_member_list_item .left_tt {

            text-align: left;
        }

        .doucment_member .doucment_member_list .doucment_member_list_item .left_tt div {
            font-size: 14px;
        }

        .doucment_member .doucment_member_list .doucment_member_list_item .left_tt p {
            font-size: 18px;
            font-weight: 700;
        }

        .doucment_member .doucment_member_list .doucment_member_list_item .right_tt {

            text-align: right;
        }

        .doucment_member .doucment_member_list .doucment_member_list_item .right_tt div {
            font-size: 14px;
            color: rgba(0, 0, 0, 0.4);
        }

        .doucment_member .doucment_member_list .doucment_member_list_item .right_tt p {
            font-size: 14px;
            color: #D54941;
        }

        .fee {
            padding: 15px 0;
            display: flex;
            justify-content: space-between;
        }

        .fee .feeCount {
            width: 30%;
            height: 450px;
            background-color: #fff;
        }

        .fee #feeCount {
            width: 95%;
            height: 400px;
            margin: 0 auto;
        }

        .fee .feeOrderCount {
            width: 68%;
            height: 450px;
            background-color: #fff;
        }

        .fee #feeOrderCount {
            width: 95%;
            height: 400px;
            margin: 0 auto;
        }

        .fee .tts {
            font-size: 20px;
            font-weight: 700;
            padding: 15px;
        }

        .good_member {
            padding: 15px 0;
            display: flex;
        }

        .good_member .good_member_item {
            width: 30%;
            background-color: #fff;
            padding: 1%;
        }

        .good_member .good_member_item:nth-child(2) {
            margin: 0 2%;
        }

        .good_member .good_member_item .tt {
            font-size: 20px;
            font-weight: 700;
        }

        .good_member .good_member_item .good_member_top {
            display: flex;
            width: 100%;
            height: 92px;
            border: 1px solid #DDDDDD;
            margin-top: 20px;
        }

        .good_member .good_member_item .good_member_top .good_member_top_item {

            width: 50%;

            text-align: center;

            padding-top: 18px;

            position: relative;
        }

        .good_member .good_member_item .good_member_top .good_member_top_item:nth-child(1):before {
            content: "";
            width: 1px;
            height: 50%;
            background-color: #DDDDDD;
            position: absolute;
            top: 25%;
            right: 0;

        }

        .good_member .good_member_item .good_member_top .good_member_top_item .tts {
            font-size: 14px;
            color: #999999;
        }

        .good_member .good_member_item .good_member_top .good_member_top_item p {
            font-size: 18px;
        }

        .good_member .good_member_item .good_member_list_header {
            display: flex;
        }

        .good_member .good_member_item .good_member_list_header .good_member_list_header_item {
            color: rgba(0, 0, 0, 0.4);
            font-size: 14px;
            line-height: 60px;
            text-align: center;
        }

        .good_member .good_member_item .good_member_list_header .good_member_list_header_item:nth-child(1) {
            width: 10%;
        }

        .good_member .good_member_item .good_member_list_header .good_member_list_header_item:nth-child(2) {
            width: 70%;
        }

        .good_member .good_member_item .good_member_list_header .good_member_list_header_item:nth-child(3) {
            width: 20%;
        }


        .good_member .good_member_item .good_member_list {

        }

        .good_member .good_member_item .good_member_list {
            color: rgba(0, 0, 0, 0.4);
            font-size: 14px;
            line-height: 60px;
            display: flex;
            align-items: center;
            text-align: center;
            justify-content: center;
        }

        .good_member .good_member_item .good_member_list .good_member_list_item:nth-child(1) {
            width: 10%;
        }

        .good_member .good_member_item .good_member_list .good_member_list_item:nth-child(1) .yuan {
            width: 24px;
            height: 24px;
            background: #0052D9;
            opacity: 1;
            color: #fff;
            line-height: 24px;
            font-size: 14px;
            border-radius: 50%;
            margin: 0 auto;
        }

        .good_member .good_member_item .good_member_list .good_member_list_item:nth-child(2) {
            width: 70%;
        }

        .good_member .good_member_item .good_member_list .good_member_list_item:nth-child(3) {
            width: 20%;
        }

        .nopic {
            display: flex;
            justify-content: center;
            align-items: center;
        }
    </style>
    <script src="/static/admin/index/echarts.min.js"></script>

</head>
<body>
<div id="app">
    <div class="nopic" v-if="isXs">
        <img src="/static/admin/index/ncs.png" alt="">
    </div>
    <div v-else>
        <div class="top">
            <div class="top-item">
                <div class="top-item-left">
                    <p>累计访客 <i class="el-icon-warning-outline"></i></p>
                    <div class="prese">
                        {{topCont.accessCount}}人
                    </div>
                </div>
                <div class="top-item-right">
                    <img src="/static/admin/index/ljfk.png" alt="">
                </div>
            </div>
            <div class="top-item">
                <div class="top-item-left">
                    <p>已注册用户 <i class="el-icon-warning-outline"></i></p>
                    <div class="prese">
                        {{topCont.memeberCount}}人
                    </div>
                </div>
                <div class="top-item-right">
                    <img src="/static/admin/index/yzcyh.png" alt="">
                </div>
            </div>
        </div>
        <div class="documenData">
            <div class="documenDataItem">
                <div class="documenDataItemImg">
                    <img src="/static/admin/index/wdzjps.png" alt="">
                    <p>待发货：</p>
                </div>
                <div class="documenDataItemTxt">
                    {{documentCont.doucmentCount}}
<!--                    {{documentCont.doucmentCount}}篇-->
                </div>
            </div>
            <div class="documenDataItem">
                <div class="documenDataItemImg">
                    <img src="/static/admin/index/ptwd.png" alt="">
                    <p>配送中：</p>
                </div>
                <div class="documenDataItemTxt">
<!--                    {{documentCont.ordinaryDoucmentCount}}篇-->
                </div>
            </div>
            <div class="documenDataItem">
                <div class="documenDataItemImg">
                    <img src="/static/admin/index/yzwd.png" alt="">
                    <p>已完成： </p>
                </div>
                <div class="documenDataItemTxt">
                    {{documentCont.highqualityDoucmentCount}}
                </div>
            </div>
            <div class="documenDataItem">
                <div class="documenDataItemImg">
                    <img src="/static/admin/index/jpwd.png" alt="">
                    <p>总金额：</p>
                </div>
                <div class="documenDataItemTxt">
                    {{documentCont.BoutiqueDoucmentCount}}
                </div>
            </div>
            <div class="documenDataItem">
                <div class="documenDataItemImg">
                    <img src="/static/admin/index/wdhyrs.png" alt="">
                    <p>昨日金额：</p>
                </div>
                <div class="documenDataItemTxt">
                    {{documentCont.feeDoucmentCount}}
                </div>
            </div>
        </div>
<!--        <div class="doucment_member">-->
<!--            <div class="tt">文档会员统计</div>-->
<!--            <div class="doucment_member_list">-->
<!--                <div class="doucment_member_list_item" v-for="(item,index) in documentGroup">-->
<!--                    <div class="left_tt">-->
<!--                        <div>{{item.title}}</div>-->
<!--                        <p>{{item.count}}人</p>-->
<!--                    </div>-->
<!--                    <div class="right_tt">-->
<!--                        <div>{{item.price}}</div>-->
<!--                        <p>{{item.price * item.count}}</p>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="fee">-->
<!--            <div class="feeCount">-->
<!--                <div class="tts">网站资金流水</div>-->
<!--                <div id="feeCount">-->

<!--                </div>-->
<!--            </div>-->
<!--            <div class="feeOrderCount">-->
<!--                <div class="tts">订单流水趋势</div>-->
<!--                <div id="feeOrderCount">-->

<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="good_member">-->
<!--            <div class="good_member_item">-->
<!--                <div class="tt">DIY卖家数据统计</div>-->
<!--                <div class="good_member_top">-->
<!--                    <div class="good_member_top_item">-->
<!--                        <div class="tts">卖家人数统计</div>-->
<!--                        <p>{{diy.memberCount}}人</p>-->
<!--                    </div>-->
<!--                    <div class="good_member_top_item">-->
<!--                        <div class="tts">产品总数量</div>-->
<!--                        <p>{{diy.GoodsCount}}人</p>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="good_member_list_header">-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        序号-->
<!--                    </div>-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        卖家名称-->
<!--                    </div>-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        产品数量-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="good_member_list" v-for="(item,index) in diy.goods" v-if="diy.goods.length > 0" v-if="index < 6">-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="yuan">{{index + 1}}</div>-->
<!--                    </div>-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="tit">{{item.nickname}}</div>-->
<!--                    </div>-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="num">{{item.meberGoodsCount}}</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="good_member_item">-->
<!--                <div class="tt">百货卖家数据统计</div>-->
<!--                <div class="good_member_top">-->
<!--                    <div class="good_member_top_item">-->
<!--                        <div class="tts">卖家人数统计</div>-->
<!--                        <p>{{bh.memberCount}}人</p>-->
<!--                    </div>-->
<!--                    <div class="good_member_top_item">-->
<!--                        <div class="tts">产品总数量</div>-->
<!--                        <p>{{bh.GoodsCount}}人</p>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="good_member_list_header">-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        序号-->
<!--                    </div>-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        卖家名称-->
<!--                    </div>-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        产品数量-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="good_member_list" v-for="(item,index) in bh.goods" v-if="bh.goods.length > 0" v-if="index < 6">-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="yuan">{{index + 1}}</div>-->
<!--                    </div>-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="tit">{{item.nickname}}</div>-->
<!--                    </div>-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="num">{{item.meberGoodsCount}}</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->
<!--            <div class="good_member_item">-->
<!--                <div class="tt">二手卖家数据统计</div>-->
<!--                <div class="good_member_top">-->
<!--                    <div class="good_member_top_item">-->
<!--                        <div class="tts">卖家人数统计</div>-->
<!--                        <p>{{es.memberCount}}人</p>-->
<!--                    </div>-->
<!--                    <div class="good_member_top_item">-->
<!--                        <div class="tts">产品总数量</div>-->
<!--                        <p>{{es.GoodsCount}}人</p>-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="good_member_list_header">-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        序号-->
<!--                    </div>-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        卖家名称-->
<!--                    </div>-->
<!--                    <div class="good_member_list_header_item">-->
<!--                        产品数量-->
<!--                    </div>-->
<!--                </div>-->
<!--                <div class="good_member_list" v-for="(item,index) in es.goods" v-if="es.goods.length > 0" v-if="index < 6">-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="yuan">{{index + 1}}</div>-->
<!--                    </div>-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="tit">{{item.nickname}}</div>-->
<!--                    </div>-->
<!--                    <div class="good_member_list_item">-->
<!--                        <div class="num">{{item.meberGoodsCount}}</div>-->
<!--                    </div>-->
<!--                </div>-->
<!--            </div>-->


<!--        </div>-->
    </div>
</div>
<script>
    var app = new Vue({
        data() {
            return {
                name: 111,
                isXs: false,
                topCont: {},
                documentCont: {},
                documentGroup: [],
                diy:{},
                bh:{},
                es:{},
            }
        },
        mounted() {
            this.GetCount()
        },
        methods: {
            //累计访客 已注册用户
            GetCount() {
                HttpGet("/GetCount", (res) => {
                    this.topCont = res.data
                })
                HttpGet("/GetAdminDoucmentData", (res) => {
                    this.documentCont = res.data
                })
                HttpGet("/GetDocumentGroupCount", (res) => {
                    this.documentGroup = res.data
                })

                HttpGet("/GetAdminStoreData?title=groupid_diy&goodtype=71", (res) => {
                    this.diy = res.data
                })

                HttpGet("/GetAdminStoreData?title=groupid_bh&goodtype=72", (res) => {
                    this.bh = res.data
                })

                HttpGet("/GetAdminStoreData?title=groupid_esn&goodtype=73", (res) => {
                    this.es = res.data
                })
            }
        }
    })

    app.$mount('#app');


    function FeeCount() {
        var chartDom = document.getElementById('feeCount');
        var myChart = echarts.init(chartDom);
        var option;
        HttpGet('GetAdminMoenyCount', (res) => {
            var datas = [
                [
                    {value: res.data.zhichu, name: '支出'},
                    {value: res.data.shouru, name: '收入'},
                    {value: res.data.lirun, name: '利润'},
                ],

            ];
            option = {
                title: {
                    left: 'center',
                    textStyle: {
                        color: '#999',
                        fontWeight: 'normal',
                        fontSize: 14
                    }
                },
                series: datas.map(function (data, idx) {
                    var top = idx * 33.3;
                    return {
                        type: 'pie',
                        radius: [0, 120],
                        top: "30%",
                        height: '33.33%',
                        left: 'center',
                        width: 400,
                        itemStyle: {
                            borderColor: '#fff',
                            borderWidth: 1
                        },
                        label: {
                            alignTo: 'edge',
                            formatter: '{name|{b}}\n{time|{c}}',
                            minMargin: 5,
                            edgeDistance: 10,
                            lineHeight: 15,
                            rich: {
                                time: {
                                    fontSize: 10,
                                    color: '#999'
                                }
                            }
                        },

                        data: data
                    };
                })
            };

            option && myChart.setOption(option);
        })
    }

    function FeeOrderCount() {
        var chartDom = document.getElementById('feeOrderCount');
        var myChart = echarts.init(chartDom);
        var option;

        HttpGet('GetAdminOrderData', (res) => {

            option = {
                xAxis: {
                    type: 'category',
                    boundaryGap: true,
                    data: res.data.time
                },
                yAxis: {
                    type: 'value'
                },
                series: [
                    {
                        data: res.data.data,
                        type: 'line',
                        smooth: true
                    }
                ]
            };

            option && myChart.setOption(option);
        })

    }


    FeeCount();
    FeeOrderCount();


</script>
</body>
</html>
